✅SHA-1 を理解する
SHA = Secure Hash Algorythm
SHA :: message of any length less than 264 bits (for SHA-1, SHA-224 and SHA-256) -> message digest
アルゴリズムによって 160 ビットから 512 ビットの範囲
デジタル署名やメッセージ認証コードの生成と検証、ランダムな数値やビットの生成に有用
SHA-1に絞ろう
message size < 2^64 bit
block size 512 bit
word size 32 bit
message digest size 160bit
2つのstepがある
preprocessing
padding a message
parsing the padded message into m-bit blocks
setting initialization values
hash computation
generate a message schedule from the padded message
以下の入力から反復的にハッシュ値のシリーズを生成
message schedule
function
constants
word operations
the message digestはfinal hashから決定される
a, b, c, …, h: Working variables that are the w-bit words used in the computation of the hash values, H(i)
H(i): The ith hash value. H(0) is the initial hash value; H(N) is the final hash value and is used to determine the message digest.
H The jth word of the ith hash value, where H is the left-most word of hash value i.
https://scrapbox.io/files/6862a0975089a9460b6fe5ee.png
https://scrapbox.io/files/6862a0c7c7ec2c21b1868f53.png
大まかに理解した